\(\int \frac {\tan (x)}{a+a \csc (x)} \, dx\) [4]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 11, antiderivative size = 40 \[ \int \frac {\tan (x)}{a+a \csc (x)} \, dx=-\frac {\log (1-\sin (x))}{4 a}-\frac {3 \log (1+\sin (x))}{4 a}-\frac {1}{2 a (1+\sin (x))} \]

[Out]

-1/4*ln(1-sin(x))/a-3/4*ln(1+sin(x))/a-1/2/a/(1+sin(x))

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3964, 90} \[ \int \frac {\tan (x)}{a+a \csc (x)} \, dx=-\frac {1}{2 a (\sin (x)+1)}-\frac {\log (1-\sin (x))}{4 a}-\frac {3 \log (\sin (x)+1)}{4 a} \]

[In]

Int[Tan[x]/(a + a*Csc[x]),x]

[Out]

-1/4*Log[1 - Sin[x]]/a - (3*Log[1 + Sin[x]])/(4*a) - 1/(2*a*(1 + Sin[x]))

Rule 90

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rule 3964

Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_.), x_Symbol] :> Dist[1/(a^(m - n
- 1)*b^n*d), Subst[Int[(a - b*x)^((m - 1)/2)*((a + b*x)^((m - 1)/2 + n)/x^(m + n)), x], x, Sin[c + d*x]], x] /
; FreeQ[{a, b, c, d}, x] && IntegerQ[(m - 1)/2] && EqQ[a^2 - b^2, 0] && IntegerQ[n]

Rubi steps \begin{align*} \text {integral}& = a^2 \text {Subst}\left (\int \frac {x^2}{(a-a x) (a+a x)^2} \, dx,x,\sin (x)\right ) \\ & = a^2 \text {Subst}\left (\int \left (-\frac {1}{4 a^3 (-1+x)}+\frac {1}{2 a^3 (1+x)^2}-\frac {3}{4 a^3 (1+x)}\right ) \, dx,x,\sin (x)\right ) \\ & = -\frac {\log (1-\sin (x))}{4 a}-\frac {3 \log (1+\sin (x))}{4 a}-\frac {1}{2 a (1+\sin (x))} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.75 \[ \int \frac {\tan (x)}{a+a \csc (x)} \, dx=-\frac {\log (1-\sin (x))+3 \log (1+\sin (x))+\frac {2}{1+\sin (x)}}{4 a} \]

[In]

Integrate[Tan[x]/(a + a*Csc[x]),x]

[Out]

-1/4*(Log[1 - Sin[x]] + 3*Log[1 + Sin[x]] + 2/(1 + Sin[x]))/a

Maple [A] (verified)

Time = 0.35 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.70

method result size
default \(\frac {-\frac {1}{2 \left (1+\sin \left (x \right )\right )}-\frac {3 \ln \left (1+\sin \left (x \right )\right )}{4}-\frac {\ln \left (\sin \left (x \right )-1\right )}{4}}{a}\) \(28\)
risch \(\frac {i x}{a}-\frac {i {\mathrm e}^{i x}}{\left (i+{\mathrm e}^{i x}\right )^{2} a}-\frac {3 \ln \left (i+{\mathrm e}^{i x}\right )}{2 a}-\frac {\ln \left ({\mathrm e}^{i x}-i\right )}{2 a}\) \(58\)

[In]

int(tan(x)/(a+a*csc(x)),x,method=_RETURNVERBOSE)

[Out]

1/a*(-1/2/(1+sin(x))-3/4*ln(1+sin(x))-1/4*ln(sin(x)-1))

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.88 \[ \int \frac {\tan (x)}{a+a \csc (x)} \, dx=-\frac {3 \, {\left (\sin \left (x\right ) + 1\right )} \log \left (\sin \left (x\right ) + 1\right ) + {\left (\sin \left (x\right ) + 1\right )} \log \left (-\sin \left (x\right ) + 1\right ) + 2}{4 \, {\left (a \sin \left (x\right ) + a\right )}} \]

[In]

integrate(tan(x)/(a+a*csc(x)),x, algorithm="fricas")

[Out]

-1/4*(3*(sin(x) + 1)*log(sin(x) + 1) + (sin(x) + 1)*log(-sin(x) + 1) + 2)/(a*sin(x) + a)

Sympy [F]

\[ \int \frac {\tan (x)}{a+a \csc (x)} \, dx=\frac {\int \frac {\tan {\left (x \right )}}{\csc {\left (x \right )} + 1}\, dx}{a} \]

[In]

integrate(tan(x)/(a+a*csc(x)),x)

[Out]

Integral(tan(x)/(csc(x) + 1), x)/a

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.78 \[ \int \frac {\tan (x)}{a+a \csc (x)} \, dx=-\frac {3 \, \log \left (\sin \left (x\right ) + 1\right )}{4 \, a} - \frac {\log \left (\sin \left (x\right ) - 1\right )}{4 \, a} - \frac {1}{2 \, {\left (a \sin \left (x\right ) + a\right )}} \]

[In]

integrate(tan(x)/(a+a*csc(x)),x, algorithm="maxima")

[Out]

-3/4*log(sin(x) + 1)/a - 1/4*log(sin(x) - 1)/a - 1/2/(a*sin(x) + a)

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.85 \[ \int \frac {\tan (x)}{a+a \csc (x)} \, dx=-\frac {3 \, \log \left (\sin \left (x\right ) + 1\right )}{4 \, a} - \frac {\log \left (-\sin \left (x\right ) + 1\right )}{4 \, a} - \frac {1}{2 \, a {\left (\sin \left (x\right ) + 1\right )}} \]

[In]

integrate(tan(x)/(a+a*csc(x)),x, algorithm="giac")

[Out]

-3/4*log(sin(x) + 1)/a - 1/4*log(-sin(x) + 1)/a - 1/2/(a*(sin(x) + 1))

Mupad [B] (verification not implemented)

Time = 18.91 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.55 \[ \int \frac {\tan (x)}{a+a \csc (x)} \, dx=\frac {\mathrm {tan}\left (\frac {x}{2}\right )}{a\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+2\,a\,\mathrm {tan}\left (\frac {x}{2}\right )+a}-\frac {3\,\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )+1\right )}{2\,a}-\frac {\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )-1\right )}{2\,a}+\frac {\ln \left ({\mathrm {tan}\left (\frac {x}{2}\right )}^2+1\right )}{a} \]

[In]

int(tan(x)/(a + a/sin(x)),x)

[Out]

tan(x/2)/(a + 2*a*tan(x/2) + a*tan(x/2)^2) - (3*log(tan(x/2) + 1))/(2*a) - log(tan(x/2) - 1)/(2*a) + log(tan(x
/2)^2 + 1)/a